package com.gxa.eshops.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.gxa.eshops.admin.entity.domain.Goods;
import com.gxa.eshps.cores.exception.BusinessException;

import java.util.Map;

/**
 * <p>
 * 商品表 服务类
 * </p>
 *
 * @author wangpeng
 * @since 2022-07-11
 */
public interface IGoodsService extends IService<Goods> {

    /**
     * 更新和删除缓存
     *
     * @param goods 货物
     * @return {@code Boolean}
     */
    Boolean updateAndDeleteCache(Goods goods);

    /**
     * 添加热产品缓存
     *
     * @param ids id
     * @return {@code Map<String, Object>}
     * @throws Exception 异常
     */
    Map<String ,Object> addHotGoodsCache(Long...ids) throws Exception;
}
